//
// Created by ole on 24-8-18.
//

#ifndef IPCSTRATEGY_H
#define IPCSTRATEGY_H
#include <memory>

#include "MessageReceiver.h"
#include "Topic.h"

class IPCStrategy {
public:
    virtual ~IPCStrategy() = default;

    virtual bool start() = 0;

    virtual bool stop() = 0;

    virtual void subscribe(const std::shared_ptr<Topic> &topic, const std::shared_ptr<MessageReceiver> &receiver) = 0;

    virtual void unsubscribe(const std::shared_ptr<Topic> &topic, const std::shared_ptr<MessageReceiver> &receiver) = 0;

    virtual void publishMessage(const std::shared_ptr<Message> &msg) = 0;

    virtual void loopForever() = 0;
};


#endif //IPCSTRATEGY_H
